@extends('admin.layout.layout')
@section('title','用户管理')

@section('con')
   <div class="widget-box">
	<div class="admin">
  

  	
   	<div class="row">
        <div class="col-lg-2">
            <h1 class="page-header">分类添加</h1>
        </div>
        <!-- /.col-lg-12 -->

    </div>
    <br>
    <br>
		
	 <form role="form"  style="font-size:18px; font-weight:bold;" action="{{url('/admin/cate/insert')}}" method="post" enctype="multipart/form-data">
         <center><div style="width:400px;">
			 @if (count($errors) > 0)
			    <div class="alert alert-danger">
			        <ul>
			            @foreach ($errors->all() as $error)
			                <li>{{ $error }}</li>
			            @endforeach
			        </ul>
			    </div>
			@endif


		</div></center>
          <div class="form-group" >
             
              所属分类: <select class="form-control" name="pid" style="width:300px">
                  <option value="0">顶级分类</option>
                 @foreach($cates as $k=>$v)
                 <option value="{{$v->tid}}">{{$v->tname}}</option>
                  @endforeach
              </select>
          </div> 
          <br>      
           <div class="form-group">                   
                                 
                分类名: <input name="tname" style="width:300px;"  type="text" class="form-control">                    
            </div> 
           <div class="form-group">      
                {{csrf_field()}}                
            <br>
            <button class="btn btn-primary" type="submit">添加</button> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                     
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <button class="btn btn-danger" type="reset">重置</button>                   
      </form>                        
                                                            
                                 
      </div>   
                           
</div>
@endsection